package cn.usian.dispatch.parameter.service.impl;

import cn.usian.dispatch.parameter.mapper.DispatchMapper;
import cn.usian.dispatch.parameter.service.IDispatchService;
import cn.usian.pojo.dispatch.DispatchParameters;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DispatchServiceImpl implements IDispatchService {
    @Autowired
    private DispatchMapper dispatchMapper;

    @Override
    public List<DispatchParameters> list() {
        return dispatchMapper.list();
    }

    @Override
    public String save(DispatchParameters dispatchParameters) {
        Integer save = dispatchMapper.save(dispatchParameters);
        if(save > 0){
            return "修改成功";
        }else{
            return "修改失败";
        }
    }

    @Override
    public DispatchParameters findById(long id) {
        return dispatchMapper.findById(id);
    }
}
